package cn.zhangchg.leetcode.arrays;

import org.jetbrains.annotations.NotNull;

public class KeyNum {
    /**
     * key
     */
    int key;
    /**
     * num
     */
    int num;

    public KeyNum(int key) {
        this.key = key;
        this.num = 1;
    }

    public int add() {
        this.num += 1;
        return this.num;
    }


    @Override
    public String toString() {
        return "KeyNum{" +
                "key=" + key +
                ", num=" + num +
                '}';
    }
}